home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 016a / dmake38.zip / STARTUP.ZTC < prev   
Text File  |  1992-01-25  |  4KB  |  156 lines

  1. # MSDOS DMAKE startup file.  Customize to suit your needs.
  2. # Assumes MKS toolkit for the tool commands, and Zortech C.  Change as req'd.
  3. # See the documentation for a description of internally defined macros.
  4. #
  5. # Disable warnings for macros redefined here that were given
  6. # on the command line.
  7. __.SILENT := $(.SILENT)
  8. .SILENT   := yes
  9.  
  10. # Configuration parameters for DMAKE startup.mk file
  11. # Set these to NON-NULL if you wish to turn the parameter on.
  12. _HAVE_RCS    := yes        # yes => RCS  is installed.
  13. _HAVE_SCCS    :=         # yes => SCCS is installed.
  14.  
  15. # Applicable suffix definitions
  16. A := .lib    # Libraries
  17. E := .exe    # Executables
  18. F := .for    # Fortran
  19. O := .obj    # Objects
  20. P := .pas    # Pascal
  21. S := .asm    # Assembler sources
  22. V :=         # RCS suffix
  23.  
  24. # See if these are defined
  25. TMPDIR := $(ROOTDIR)/tmp
  26. .IMPORT .IGNORE : TMPDIR SHELL COMSPEC
  27.  
  28. # Recipe execution configurations
  29. # First set SHELL, If it is not defined, use COMSPEC, otherwise
  30. # it is assumed to be MKS Korn SHELL.
  31. .IF $(SHELL) == $(NULL)
  32. .IF $(COMSPEC) == $(NULL)
  33.    SHELL := $(ROOTDIR)/bin/sh$E
  34. .ELSE
  35.    SHELL := $(COMSPEC)
  36. .END
  37. .END
  38. GROUPSHELL := $(SHELL)
  39.  
  40. # Now set remaining arguments depending on which SHELL we
  41. # are going to use.  COMSPEC (assumed to be command.com) or
  42. # MKS Korn Shell.
  43. .IF $(SHELL)==$(COMSPEC)
  44.    SHELLFLAGS  := $(SWITCHAR)c
  45.    GROUPFLAGS  := $(SHELLFLAGS)
  46.    SHELLMETAS  := *"?<>
  47.    GROUPSUFFIX := .bat
  48.    DIRSEPSTR   := \\
  49.    DIVFILE      = $(TMPFILE:s,/,\)
  50. .ELSE
  51.    SHELLFLAGS  := -c
  52.    GROUPFLAGS  := 
  53.    SHELLMETAS  := *"?<>|()&][$$\#`'
  54.    GROUPSUFFIX := .ksh
  55.    .MKSARGS    := yes
  56.    DIVFILE      = $(TMPFILE:s,/,${DIVSEP_shell_${USESHELL}})
  57.    DIVSEP_shell_yes := \\\
  58.    DIVSEP_shell_no  := \\
  59. .END
  60.  
  61. # Standard C-language command names and flags
  62.    CC      := ztc        # C-compiler and flags
  63.    CFLAGS  +=
  64.  
  65.    AS      := masm        # Assembler and flags
  66.    ASFLAGS +=
  67.  
  68.    LD       = blink        # Loader and flags
  69.    LDFLAGS +=
  70.    LDLIBS   =
  71.  
  72. # Definition of $(MAKE) macro for recursive makes.
  73.    MAKE = $(MAKECMD) $(MFLAGS)
  74.  
  75. # Language and Parser generation Tools and their flags
  76.    YACC      := yacc        # standard yacc
  77.    YFLAGS +=
  78.    YTAB      := ytab        # yacc output files name stem.
  79.  
  80.    LEX      := lex        # standard lex
  81.    LFLAGS +=
  82.    LEXYY  := lex_yy        # lex output file
  83.  
  84. # Other Compilers, Tools and their flags
  85.    PC    := any_pc        # pascal compiler
  86.    RC    := anyf77        # ratfor compiler
  87.    FC    := anyf77        # fortran compiler
  88.  
  89.    CO       := co        # check out for RCS
  90.    COFLAGS += -q
  91.  
  92.    AR     := ar            # archiver
  93.    ARFLAGS+= ruv
  94.  
  95.    RM       := rm        # remove a file command
  96.    RMFLAGS +=
  97.  
  98. # Implicit generation rules for making inferences.
  99. # We don't provide .yr or .ye rules here.  They're obsolete.
  100. # Rules for making *$O
  101.    %$O : %.c ; $(CC) $(CFLAGS) -c $<
  102.    %$O : %.cpp ; $(CC) $(CFLAGS) -c $<
  103.    %$O : %$P ; $(PC) $(PFLAGS) -c $<
  104.    %$O : %$S ; $(AS) $(ASFLAGS) $(<:s,/,\);
  105.    %$O : %.cl ; class -c $<
  106.    %$O : %.e %.r %.F %$F ; $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
  107.  
  108. # Executables
  109.    %$E : %$O ; $(CC) $(LDFLAGS) -o$@ $< $(LDLIBS)
  110.  
  111. # lex and yacc rules
  112.    %.c : %.y ; $(YACC)  $(YFLAGS) $<; mv $(YTAB).c $@
  113.    %.c : %.l ; $(LEX)   $(LFLAGS) $<; mv $(LEXYY).c $@
  114.  
  115. # RCS support
  116. .IF $(_HAVE_RCS)
  117.    % : $$(@:d)RCS$$(DIRSEPSTR)$$(@:f)$V;- $(CO) $(COFLAGS) $@
  118.    .NOINFER : $$(@:d)RCS$$(DIRSEPSTR)$$(@:f)$V
  119. .END
  120.  
  121. # SCCS support
  122. .IF $(_HAVE_SCCS)
  123.    % : s.% ; get $<
  124.    .NOINFER : s.%
  125. .END
  126.  
  127. # Recipe to make archive files.
  128. %$A :
  129. [
  130.    $(AR) $(ARFLAGS) $@ $?
  131.    $(RM) $(RMFLAGS) $?
  132. ]
  133.  
  134. # DMAKE uses this recipe to remove intermediate targets
  135. .REMOVE :; $(RM) -f $<
  136.  
  137. # AUGMAKE extensions for SYSV compatibility
  138. @B = $(@:b)
  139. @D = $(@:d)
  140. @F = $(@:f)
  141. "*B" = $(*:b)
  142. "*D" = $(*:d)
  143. "*F" = $(*:f)
  144. <B = $(<:b)
  145. <D = $(<:d)
  146. <F = $(<:f)
  147. ?B = $(?:b)
  148. ?F = $(?:f)
  149. ?D = $(?:d)
  150.  
  151. # Turn warnings back to previous setting.
  152. .SILENT := $(__.SILENT)
  153.  
  154. # Local init file if any, gets parsed before user makefile
  155. .INCLUDE .IGNORE: "_startup.mk"
  156.